Image processing program, computer-readable recording medium recorded with image processing program, image processing mehtod and image processing apparatus

ABSTRACT

An image condition is judged based on a mean value and a standard deviation of a feature quantity of an image, and image correction information in the image condition is created based on the mean value and the standard deviation, to thereby correct the image, based on the created image correction information. In this manner, parameters for the image correction processing are determined automatically and highly accurately corresponding to the feature quantity of the image, and the image correction processing is performed based on the parameters. Therefore, the image quality can be improved, while considerably reducing the labor of the operator who performs the image processing.

[0001] This application is a continuation of PCT/JP02/00605, filed on Jan. 28, 2002.

TECHNICAL FIELD

[0002] The present invention relates to an image processing technique that determines automatically and highly accurately parameters for image correction processing, and improves the image quality of an image.

BACKGROUND ART

[0003] Heretofore, there has been performed gradation correction processing such as changing the brightness or contrast of an image which requires the improvement in image quality, using an image processing apparatus. In such an image processing apparatus, an operator recognizes a problem in the image subjectively, and determines parameters for improving the problem based on his/her experience, to thereby perform the gradation correction processing by trial and error.

[0004] However, since the gradation correction processing is performed by trial and error, sometimes the operator must perform the gradation correction processing repetitively, while changing the parameters diversely, until the intended image quality can be obtained. In this case, labor of the operator required for improving the image quality is considerable, and this problem is particularly noticeable in general users who use photo-retouching software or the like, since they do not have enough knowledge relating to image processing.

[0005] Recently, a technique for automatically performing image correction processing has been developed, in order to reduce the labor of the operator. With this technique however, since the parameters for the image correction processing are determined, without recognizing a main object in the image, a corrected image may be significantly different from the image quality that the operator intends.

[0006] In view of the problems described above, it is an object of the present invention to provide an image processing technique that can improve the image quality, while considerably reducing the labor of the operator, by determining automatically and highly accurately parameters for the image correction processing, corresponding to a feature quantity of the image.

DISCLOSURE OF THE INVENTION

[0007] In an image processing technique according to the present invention, an image condition is judged based on a mean value and a standard deviation of feature quantity of an image, and also image correction information in the image condition is created based on the mean value and the standard deviation, to thereby correct the image, based on the created image correction information. The “image condition” herein stands for an index for classifying, for example, the brightness of the image as “bright”, “normal” or “dark”, and the contrast as “high”, “normal” or “low”.

[0008] In this manner, parameters for the image correction processing are determined automatically and highly accurately corresponding to the feature quantity of the image, and the image correction processing is performed based on the parameters. Therefore, the image quality can be improved, while considerably reducing labor of an operator who performs the image processing.

[0009] Further, it is desirable that the image condition is judged by a probability belonging to each image condition, calculated by a two-dimensional normal distribution probability function in which the mean value and the standard deviation of the image feature quantity are variables. In this case, when the maximum value of the probability is larger than a predetermined value, then desirably, the image condition which becomes the maximum probability is judged to be the image condition of the image. On the other hand, when the maximum value of the probability is the predetermined value or less, then it is desirable to judge that the image belongs to a plurality of image conditions, that is, the image is in an intermediate condition. When it is judged that the image belongs to a plurality of image conditions, then desirably, image correction information is created, by integrating the image correction information in the respective image conditions corresponding to the probability.

[0010] In such a configuration, if the image condition is judged by the two-dimensional normal distribution probability function, the image condition of the image can be judged highly accurately, by appropriately setting the two-dimensional normal distribution probability function. Moreover, when the maximum value of the probability is larger than the predetermined value, if it is judged that the image condition having the maximum probability is the image condition of the image, the image condition can be judged uniquely. On the other hand, when the maximum value of the probability is the predetermined value or less, if it is judged that the image belongs to a plurality of image conditions, an image intermediate among the plurality of image conditions can be processed highly accurately. In this case, the image correction information in the respective image conditions is integrated corresponding to the probability to create the image correction information, thereby enabling to create image correction information taking the intermediate condition into consideration.

[0011] Moreover, the mean value and the standard deviation of the image feature quantity in each area obtained by dividing the image into a plurality of areas, may be multiplied by a weighting value corresponding to a difference between the maximum value and the minimum value of the image feature quantity in each area, and the sum of multiplied values is then designated as the mean value and the standard deviation of the image feature quantity. In this manner, the mean value and the standard deviation of the image feature quantity is extracted with a focus on an area considered to be a main part in the image. As a result, the judgment of the image condition can be performed with higher accuracy, as compared with a method of extracting the mean value and the standard deviation of the image feature quantity from the whole image.

[0012] Other than the above, whether or not a corrected image is an intended image may be input and an input result is stored, and the probability that the corrected image is the intended image may be displayed based on the stored input result. In this manner, when a large amount of images is pro collectively by batch processing or the like, it is only necessary to visually confirm a correction result of the image having a low probability, thereby considerably reducing the labor of the operator.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 is a block diagram of an image processing apparatus, which realizes the present invention,

[0014]FIG. 2 is a flowchart showing the processing content in an image statistics extracting section.

[0015]FIG. 3 shows a procedure for dividing an input image to calculate image statistics, in which (A) shows an input image, (B) shows the divided input image and (C) shows weighting values for respective areas.

[0016]FIG. 4 is a flowchart showing the processing content in an image condition recognizing section.

[0017]FIG. 5 is a flowchart showing the processing content in an image correction information creating section.

[0018]FIG. 6 is a flowchart showing the processing content in an image correcting section.

[0019]FIG. 7 is a flowchart showing the processing content in an adopted image information informing section.

[0020]FIG. 8 is a flowchart showing the processing content in an adopted image information creating section.

BEST MODE FOR CARRYING OUT THE INVENTION

[0021] An outline of an image processing technique according to the present invention will be described first.

[0022] In the present invention, a database is constructed in order to determine parameters for image correction processing. In other words, a plurality of images, whose image conditions are different from each other, is prepared as reference images, range transformation is conducted so that densities of the respective images are distributed over the whole density range, to perform the density normalization, and these images are set to normalized images. Next, the normalized image is displayed on a display device such as a display, and classified into respective image conditions by visual inspection of an operator. The “image condition” herein stands for an index for classifying, for example, the brightness of the image as “bright”, “normal” or “dark”, and the contrast as I“high”, “normal” or “low”. When the operator has sufficient knowledge and experience relating to the image processing, the reference image itself may be displayed without performing the density normalization.

[0023] A luminance component Y for all pixels is then extracted for the normalized image classified into the respective image conditions, and a luminance mean value μ and a luminance standard deviation σ are respectively calculated by the following equations, wherein n denotes the number of pixel in the image. $\mu = {\sum\limits_{l = 1}^{n}\frac{Y_{l}}{n}}$ $\sigma = \sqrt{\frac{1}{n}{\sum\limits_{j = 1}^{n}\left( {Y_{j} - \mu} \right)^{2}}}$

[0024] The luminance mean value μ and the luminance standard deviation σ of the image included in the respective image conditions are set to variables, to create a two-dimensional normal distribution probability function for each image condition, which is set as an image condition probability function F_(i) (x, y) expressed by the following equation, wherein μ_(x) and μ_(y) respectively denote mean values of the luminance mean value μ and the luminance standard deviation σ of the normalized image in the respective image conditions, and σ_(x) and σ_(y) respectively denote a standard deviation of the luminance mean value μ and the luminance standard deviation σ of the normalized image in the respective image conditions. Moreover, ρ_(xy) denotes a correlation coefficient between the luminance mean value μ and the luminance standard deviation σ of the normalized image in the respective image conditions. ${F_{i}\left( {x,y} \right)} = {\frac{1}{{2\quad \pi \quad \sigma_{x}\sigma_{y}\sqrt{1}} - \rho_{xy}}{\exp \left\lbrack {{- \frac{1}{2\left( {1 - \rho_{xy}} \right)}}\left\{ {\frac{\left( {x - \mu_{x}} \right)^{2}}{\sigma_{x}^{2}} + \frac{\left( {y - \mu_{y}} \right)^{2}}{\sigma_{y}^{2}} - \frac{2\quad {\rho_{xy}\left( {x - \mu_{x}} \right)}\left( {y - \mu_{y}} \right)}{\sigma_{x}\sigma_{y}}} \right\}} \right\rbrack}}$

[0025] The image condition probability function F; (x, y) created in this manner is stored in the database for each image condition.

[0026] Moreover, an equal probability ellipse, being a group of points having equal probability value, is integrated for each image condition probability function F_(i) (x, y,), to thereby divide it into a plurality of previously set probability sections. At this time, all the probability values of the respective probability sections are made equal. Furthermore, a unique number is added to each probability section obtained by dividing the image condition probability function from the central part towards the peripheral parts, and these are set to probability section numbers of the respective image conditions. Counters for counting the “number of adopted images” and “number of unadopted images” are respectively provided corresponding to these probability section numbers, and the contents thereof are initially set to 0.

[0027] Through such a series of processing, preparation for image processing with respect to an image whose image condition is unknown is completed. In the database for determining the parameters for the image correction processing, a default may be set using a plurality of images indicating representative image conditions.

[0028] The image processing with respect to the image whose image condition is unknown is performed in the following manner.

[0029] At first, the range transformation is conducted so that density of the image is distributed over the whole density range, to perform the density normalization, and this image is set to a normalized image P. A luminance component Y is extracted from the normalized image P for all pixels, to thereby calculate the luminance mean value μ and the luminance standard deviation σ, respectively.

[0030] Here, the luminance mean value μ and the luminance standard deviation σ in the normalized image P may be calculated by dividing the normalized image P into a plurality of m areas and integrating the luminance mean values μ_(m) and the luminance standard deviations σ_(m) in the respective areas. In other words, the normalized image P is divided into the plurality of m areas, and the luminance component Y is extracted for each area, to thereby respectively calculate the luminance mean value μ_(m) and the luminance standard deviation σ_(m). A luminance difference between the highest luminance and the lowest luminance in each area is calculated, to determine a weighting value uniquely determined according to the luminance difference. At this time, the area having a large luminance difference has variations in contrast, and hence it can be judged that there exists a plurality of pixels having different brightness, hue and chroma, and more contours exist as compared with other areas. On the other hand, the area having a small luminance difference has less variation in contrast, and hence it can be judged that pixels having different brightness, hue and chroma are not so many as compared with the area having the large luminance difference. Therefore, the weighting value is set to a large value in the area having the large luminance difference and to a small value in the area having the small luminance difference.

[0031] The luminance mean value μ_(m) and the luminance standard deviation o_(m) are then multiplied by the weighting value for each area, and the sum of respective multiplied values is obtained, to thereby calculate luminance mean value μ and the luminance standard deviation σ in the normalized image P. In this manner, the main object to be noted existing in the image is emphasized, and parameters for the image correction processing can be determined with higher accurately.

[0032] When the luminance mean value μ and the luminance standard deviation σ in the normalized image P can be calculated, these are substituted in the image condition probability functions F_(i) (x, y) in the respective image conditions, to calculate the probability values in the respective image conditions.

[0033] When the maximum probability value is larger than a predetermined value α, it is assumed that the image condition having the maximum probability value is the image condition of the normalized image P. Then, the probability value proportion of the image condition having the maximum probability value is set to 1, and the probability value proportion of other image conditions is set to 0, in order to uniquely determine the image condition of the normalized image P. On the other hand, when the maximum probability value is the predetermined value α or less, it is judged that the image condition of the normalized image P cannot be determined uniquely, and hence the probability value proportion in each image condition is calculated by the following manner. That is, the sum of the probability values in the respective image conditions is calculated, and the probability value in each image condition is divided by the sum of the probability values, to thereby calculate the probability value proportion in each image condition.

[0034] When the probability value proportion in each image condition can be calculated, the image correction information is created. The image correction information includes parameters for correcting the image condition to the most appropriate image condition with respect to the luminance mean value μ and the luminance standard deviation σ indicating the image condition. In other words, when the image condition of the normalized image P is determined uniquely, it is assumed that image correction information relating to the image condition having the probability value proportion of 1 is set to image correlation information of the normalized image P. On the other hand, when the image condition of the normalized image P is not determined uniquely, the probability value proportions are integrated corresponding to the probability value proportions in the respective image conditions and this integrated value is set to the image correction information of the normalized image P.

[0035] Image correction is then performed on the normalized image P using the image correction information. In this manner, the normalized image P is corrected to the optimum image condition. In the description below, a corrected image is referred to as a corrected image P′.

[0036] Next, a probability zone to which the probability value of the normalized image P belongs is calculated for each image condition. The sum of the number of adopted images is divided by the sum of the number of adopted images and the number of unadopted images in each image condition, for each calculated probability zone, to be informed to the operator as the “probability” of the normalized image P. However, when the sum of the number of adopted images and the number of unadopted images in each image condition is 0, the probability is not calculated, and the operator is informed that the probability is uncertain.

[0037] When the probability is informed to the operator, the corrected image P′ is displayed on a screen, so that the operator judges visually whether or not the corrected image P′ is the adopted image corrected to be in an intended image condition. When the corrected image P′ is the adopted image, the probability value proportion is added to an adopted image counter, in the corresponding probability zones in the respective image conditions. On the other hand, when the corrected image P′ is the unadopted image, the probability value proportion is added to an unadopted image counter, in the corresponding probability zones in the respective image conditions.

[0038] The processing after displaying the probability may be performed according to the instruction of the operator.

[0039] A specific example of the present invention will be described with reference to the appended drawings.

[0040]FIG. 1 shows a configuration of an image processing apparatus which realizes the image processing technique according to the present invention. The image processing apparatus is constructed on a computer equipped with at least a central processing unit (CPU) and a memory, and is operated according to a program loaded in the memory.

[0041] The image processing apparatus comprises image condition DB 10, image correction DB 12, an adopted and unadopted image DB 14, an image statistics extracting section 16, an image condition judging section 18, an image correction information creating section 20, an image correcting section 22, an adopted image information informing section 24, and an adopted image information creating section 26.

[0042] In the image condition DB 10, the image condition probability function F_(i) (x, y) is stored for each image condition. The image condition probability function F_(i) (x, y) is created through the process described above.

[0043] In the image correction DB 12, a gamma value y, corresponding to the luminance mean value μ and the luminance standard deviation σ is stored for each image condition, as a parameter for the image correction processing.

[0044] In the adopted and unadopted image DB 14, an adopted image counter AC_(in) and an unadopted image counter RC_(in) are stored as indexes indicating whether or not a gamma-corrected image is to be accepted. The adopted image counter AC_(in) and the unadopted image counter RC_(in) are constructed so that a real value can be calculated, taking into consideration that the image may belong to a plurality of image conditions.

[0045] The image statistics extracting section 16 extracts the luminance mean value μ and the luminance standard deviation σ as an image feature quantity of an image to be image processed (hereunder referred to as “input image”). In other words, after the density of the input image is normalized by the range transformation, the luminance mean values 1 and the luminance standard deviations σ with respect to the luminance component of all pixels are respectively calculated. The image statistics extracting section 16 realizes a statistics extracting function, a statistics extracting step and statistics extracting means.

[0046] The image condition judging section 18 calculates the probability value proportion G_(i) in each image condition of the input image, based on the luminance mean value μ and the luminance standard deviation σ in the normalized image P. The “probability value proportion” herein stands for the proportion at which the input image belongs to each image condition, and for example, when the brightness is slightly dark, the probability value proportions in a bright condition, a normal condition and a dark condition become 0.0, 0.5 and 0.5, respectively. The image condition judging section 18 realizes an image condition judging function, an image condition judging step and image condition judging means.

[0047] The image correction information creating section 20 creates image correction information for correcting the image condition of the input image to an optimum. In other words, image correction information in the respective image conditions is read from the image correction DB 12, based on thc luminance mean value μ and the luminance standard deviation σ in the normalized image P, to create the image correction information with respect to the whole image corresponding to the probability value proportion G_(i). The image correction information creating section 20 realizes a correction information creating function, a correction information creating step and correction information creating means.

[0048] The image correcting section 22 corrects the input image based on the image correction information created by the image correction information creating section 20. The image correcting section 22 realizes an image correcting function, an image correcting step and image correcting means.

[0049] The adopted image information informing section 24 informs the operator of the “probability”. Here, the “probability” is an index indicating the likelihood that the corrected image P′ is corrected to the image condition intended by the operator. The adopted image information informing section 24 realizes a probability display function.

[0050] In the adopted image information creating section 26, whether or not correction intended by the operator has been performed with respect to the input image is input, to update the adopted image counter AC_(in) or the unadopted image counter RC_(in) stored in the adopted and unadopted image DB 14. The adopted image information creating section 26 realizes an input function and an input result storing function.

[0051]FIG. 2 shows extraction processing of the image feature quantity executed in the image statistics extracting section 16.

[0052] In step 1 (in the figure, abbreviated as “S1”, and similarly thereafter), the input image is input. The input image is a color image in which RGB form the color space, and for example, an image obtained by scanning a silver-salt photograph by a scanner, or an image photographed by a digital camera is used.

[0053] In step 2, the normalized image P obtained by normalizing the density of the input image is created. In other words, the range transformation of the input image is conducted so that the density of the pixels in the input image is distributed over the whole range where the density can be distributed (for example, from 0 to 255 in an image having eight bits for each color), to thereby create the normalized image P.

[0054] In step 3, the luminance component Y is extracted by, for example, the following equation, for the whole pixels in the normalized image P. Here, R, G and B respectively indicate values of the RGB components in the pixel.

Luminance Y=0.30×R+0.59×G+0.11×B

[0055] In step 4, it is judged whether or not image feature quantity is to be extracted from the whole image. The construction is desirable such that, whether or not the image feature quantity is to be extracted from the whole image, can be optionally set on the screen where the operation of the image processing apparatus is performed. If the image feature quantity is to be extracted from the whole image, control proceeds to step 5 (Yes), while if the image feature quantity is not to be extracted from the whole image, control proceeds to step 6 (No).

[0056] In step 5, the luminance mean value μ and the luminance standard deviation σ are calculated for all pixels in the normalized image P by the following equations. Here, n denotes the number of pixels in the normalized image P. $\mu = {\sum\limits_{l = 1}^{n}\frac{Y_{l}}{n}}$ $\sigma = \sqrt{\frac{1}{n}{\sum\limits_{j = 1}^{n}\left( {Y_{j} - \mu} \right)^{2}}}$

[0057] In step 6, the normalized image P is divided into a plurality of areas. For example, as shown in (A) and (B) of FIG. 3, the normalized image P is evenly divided into three longitudinally and laterally, respectively, to obtain nine areas A_(m) (1≦m≦9) having a substantially uniform area.

[0058] In step 7, the luminance mean value μ_(m) and the luminance standard deviation σ_(m) are calculated for each area A_(m) by the following equations, wherein n_(m) denotes the number of pixels in the area A_(m). $\mu_{m} = {\sum\limits_{l = 1}^{n_{m}}\frac{Y_{l}}{n_{m}}}$ $\sigma_{m} = \sqrt{\frac{1}{n_{m}}{\sum\limits_{j = 1}^{n_{m}}\left( {Y_{j} - \mu_{m}} \right)^{2}}}$

[0059] in step 8, the maximum luminance Y_(max) and the minimum luminance Y_(min) of the pixel are determined for each area A_(m), and a luminance difference D_(m) between them is calculated by the following equation.

Luminance difference D _(m) =Y _(max) −Y _(min)

[0060] In step 9, as shown in (C) of FIG. 3, a weighting value C_(m) uniquely determined corresponding to the luminance difference D_(m) is calculated. Here, the weighting value C_(m) is set such that the weighting value in an area having the largest luminance difference is 1.0, and the weighting value in other area is a value smaller than 1.0 (for example, 0.0).

[0061] In step 10, the luminance mean value μ and the luminance standard deviation σ of the whole image are calculated by the following equations, taking into consideration the feature of each area A_(m). $\mu = {\sum\limits_{m = 1}^{\theta}\left( {\mu_{m} \times C_{m}} \right)}$ $\sigma = {\sum\limits_{m = 1}^{\theta}\left( {\sigma_{m} \times C_{m}} \right)}$

[0062] According to the processing of from step 1 to step 10 described above, the normalized image P obtained by normalizing the density at the input image is created, and the luminance Y is extracted from all pixels. When the image feature quantity is to be extracted from the whole image, the luminance mean value μ and the luminance standard deviation σ are calculated for all pixels in the normalized image P. On the other hand, when the image feature quantity is not extracted from the whole image, the normalized image P is divided into the plurality of areas A_(m), and the luminance mean value μ_(m) and the luminance standard deviation σ_(m) are calculated for each area A_(m). Then, the luminance mean value μ and the luminance standard deviation σ of the whole image are calculated, using the weighting value C_(m) corresponding to the luminance difference D_(m) in each area A_(m).

[0063] Therefore, when the normalized image P is divided into the plurality of areas A_(m), in an area having a large luminance difference, there are variations in contrast, and hence it is expected that there exists a plurality of pixels having different brightness, hue and chroma, and more contours exist as compared with other areas. Therefore, the image statistics value is extracted, with a focus on an area containing a main part to be noted, and hence the feature of the image can be extracted highly accurately.

[0064]FIG. 4 shows the probability value proportion calculation processing executed in the image condition judging section 16.

[0065] In step 11, the luminance mean value μ and the luminance standard deviation π are input.

[0066] In step 12, the luminance mean value μ and the luminance standard deviation σ are substituted in the image condition probability function F_(i)(x, y) (1≦i≦3) stored in the image condition DB 10 , to calculate the probability value F_(i)(μ, σ) in each image condition.

[0067] In step 13, it is judged whether or not the maximum value F_(max) of the probability value is larger than the predetermined value α if the maximum value F_(max) is larger than the predetermined value α, control proceeds to step 14 (Yes), while if the maximum value F_(max) is the predetermined value α or less, control proceeds to step 15 (No).

[0068] In step 14, the probability value proportion G_(i) in the image condition in which the probability value becomes the maximum is set to 1,0, and the probability value proportion G_(i) in other conditions is set to 0.0.

[0069] In step 15, the total of the probability values of all image conditions is calculated according to the following equation, and the probability value in each image condition is divided by the total of the probability values, and the result is set to the probability value proportion G_(i) (1≦i≦3). ${G_{i} = \frac{F_{i}\left( {\mu,\sigma} \right)}{\sum\limits_{j = 1}^{3}{F_{j}\left. \langle{\mu,\sigma} \right)}}},{{{where}\quad 1} \leq i \leq 3}$

[0070] According to the processing of from step 11 to step 15 described above, the probability value proportion G_(i) in each image condition is calculated, based on the luminance mean value μ and the luminance standard deviation σ in the normalized image P. Therefore, the proportion at which the input image belongs to the respective image conditions can be understood through the probability value proportion G_(i).

[0071]FIG. 5 shows the image correction information creation processing, executed in the image correction information creating section 20.

[0072] In step 21, the probability value proportion G_(i) in each image condition is input.

[0073] In step 22, the image correction information corresponding to the luminance mean value μ and the luminance standard deviation σ in the normalized image P, specifically, the gamma value γ_(i) (1≦i≦3) is read from the image correction DB 12.

[0074] In step 23, a gamma value γ_(p) for correcting the input image is obtained. That is to say, as shown in the following equation. the probability value proportions G_(i) in the respective image conditions of the normalized image P and the gamma value γ_(i) are multiplied, and the sum thereof is set to the gamma value γ_(p) for correcting the image correction. $\gamma_{p} = {\sum\limits_{i = 1}^{3}\left( {G_{i} \times \gamma_{i}} \right)}$

[0075] According to the processing of from step 21 to step 23 described above, the gamma values γ_(i) in the respective image condition corresponding to the luminance mean value μ and the luminance standard deviation σ in the normalized image P are read. Then, the read gamma values γ_(i) is distributed and integrated, corresponding to the probability value proportions G_(i) in the respective image conditions of the normalized image P_(i) to thereby obtain the gamma value γ_(p) for correcting the input image.

[0076]FIG. 6 shows image correction processing for the input image, executed in the image correcting section 22.

[0077] In step 31, the input image and the image correction information are input.

[0078] In step 32, gamma correction is executed on the input image, according to the following equation, using the gamma value γ_(p), being the image correction information. In the gamma correction, a pixel value x of the input image is converted to an output pixel value y by a gamma curve. Here, the gamma correction is executed on the respective components of RGB in the input image, and an output image thereof is set to the corrected image P′.

y=x ^(γp)

[0079] In step 33, the corrected image P′ is displayed via the display device.

[0080] According to the processing of from step 31 to step 33 described above, the gamma correction is executed on the input image, using the gamma value γ_(p) as the image correction information. Then, the corrected image P′ is displayed via the display device.

[0081]FIG. 7 shows “probability” informing processing executed in the adopted image information informing section 24.

[0082] In step 41, the probability value F_(i) (μ,σ)(1≦i≦3) of the normalized image P in each image condition is input.

[0083] In step 42, the probability zone n to which the probability value F_(i)(=82 , σ) of the normalized image P in each image condition belongs is calculated.

[0084] In step 43, the adopted image counter AC_(in) and the unadopted image counter RC_(in) in each image condition are taken out from the adopted and unadopted image DB 14, for the calculated probability zone n, and “probability” R of the input image is calculated according to the following equation. However, in the following equation, if the denominator is 0, the “probability” R is not calculated, and the operator is informed that the “probability” is uncertain. $R = \frac{\sum\limits_{i = 1}^{3}{A\quad C_{i\quad n}}}{{\sum\limits_{i = 1}^{3}{A\quad C_{i\quad n}}} + {\sum\limits_{i = 1}^{0}{R\quad C_{i\quad n}}}}$

[0085] In step 44, the “probability” R is displayed via the display device.

[0086] According to the processing of from step 41 to step 44 described above, the “probability” R is informed to the operator of the image processing apparatus, as an index indicating the “probability” that the intended correction has been performed. Therefore, for example, even when a large amount of images is collectively processed by batch processing, it is only necessary to visually confirm the correction result of the images having the “probability” R of the predetermined value or less, thereby further reducing the labor of the operator.

[0087]

G. 8 shows update processing of the adopted image counter and the unadopted image counter, executed in the adopted image information creating section 26.

[0088] In step 51, the probability zone n in each image condition is input.

[0089] In step 52, the judgment result by the visual inspection of the operator, of whether the corrected image P is the “adopted image” closed to the intended image condition, or the “unadopted image” far from the intended image condition, is input.

[0090] In step 53, it is judged whether or not the corrected image P′ is the adopted image. If the corrected image P′ is the adopted image, control proceeds to step 54 (Yes), while if the corrected image P′ is the unadopted image, control proceeds to step 55 (No).

[0091] In step 54, the adopted image counter AC_(in) in the probability zone n stored in the adopted and unadopted image DB is updated for each image condition according to the following equation.

AC_(in)=AC_(m)+G_(i)

[0092] In step 55, the unadopted image counter RC_(in) in the probability zone n stored in the adopted and unadopted image DB is updated for each image condition according to the following equation.

RC_(in)=RC_(in)+G_(i)

[0093] According to the processing of from step 51 to step 55 described above, the adopted image counter or the unadopted image counter is updated according to the judgment result of the “adopted image” or the “unadopted image” indicating whether or not the corrected image P′ is to be accepted. Therefore, as the number of uses of the image processing apparatus is increased, the data for calculating the “probability”

of the corrected image P′ is enriched, thereby enabling improvement in the calculation accuracy.

[0094] According to the image processing apparatus having such a configuration, the probability value proportion G_(i) in each image condition to which the input image belongs is calculated by the image condition probability function F_(i) prepared in advance, based on the luminance mean value μ and the luminance standard deviation σ indicating the feature quantity of the input image. Then, the gamma values γ_(i) as the image correction information in the respective image conditions are calculated, and the gamma value γ_(p) is calculated by distributing and integrating the gamma values γ_(i) corresponding to the calculated probability value proportion G_(i). Thereafter, the input image is gamma-corrected by the gamma value γ_(p.) Hence, the parameters for the image correction are automatically set, by appropriately setting the image condition probability function F_(i) in each image condition, and the input image is corrected without the intervention of the operator. As a result, since the parameters for the image correction processing are automatically and highly accurately determined corresponding to the image feature quantity, the image quality can be improved, while considerably reducing the labor of the operator.

[0095] When the corrected image is displayed, the labor of the operator can be further reduced, by also displaying the “probability” as an index indicating the likelihood that it is an image intended by the operator. In other words, the operator needs only to selectively monitor or inspect the images having low “probability”, without the need of monitoring or inspecting all corrected images. Here, since the “probability” is calculated based on the adopted image counter and the unadopted image counter in which the judgment results by the visual inspection of the operator are accumulated, then with an increase in the number of use of the image processing apparatus, the data for the calculation is enriched, thereby enabling improvement in the calculation accuracy.

[0096] If a program for realizing such functions is recorded on a computer-readable recording medium, such as a magnetic tap, a magnetic disk, a magnetic drum, an IC card, a CD-ROM, a DVD-ROM or the like, the image processing program according to the present invention can be distributed in the market. Then, a person who acquires such a recording medium can easily construct the image processing apparatus according to the present invention using a general computer.

INDUSTRIAL APPLICABILITY

[0097] As described above, the image processing technique according to the present invention can improve image quality, while considerably reducing the labor of the operator, by determining the parameters for the image correction processing corresponding to the image feature quantity automatically and highly accurately. Hence, it is extremely useful. 

What is claimed is:
 1. An image processing program for realizing on a computer: a statistics extracting function for extracting a mean value and a standard deviation of a feature quantity of an image; an image condition judging function for judging an image condition, based on the mean value and the standard deviation extracted by said statistics extracting function; a correction information creating function for creating image correction information in the image condition judged by said image condition judging function, based on the mean value and the standard deviation extracted by said statistics extracting function; and an image correcting function for correcting the image, based on the image correction information created by said correction information creating function.
 2. An image processing program according to claim 1, wherein said image condition judging function judges the image condition of said image through a two-dimensional normal distribution probability function for calculating the probability that an image belongs to each image condition, in which the means value and the standard deviation of the image feature quantity are set to variables.
 3. An image processing program according to claim 2, wherein when the maximum value of said probability is larger than a predetermined value, said image condition judging function judges that the image condition which becomes said probability is the image condition of said image.
 4. An image processing program according to claim 2, wherein when the maximum value of said probability is a predetermined value or less, said image condition judging function judges that said image belongs to a plurality of image conditions.
 5. An image processing program according to claim 4, wherein when it is judged by said image condition judging function that said image belongs to the plurality of image conditions, said correction information creating function integrates the image correction information in the respective image conditions, corresponding to said probability, to create the image correction information.
 6. An image processing program according to claim 1, wherein said statistics extracting function multiplies the mean value and the standard deviation of the image feature quantity in each area obtained by dividing the image into a plurality of areas, by a weighting value corresponding to a difference between the maximum value and the minimum value of the image feature quantity in each area, and sets the sum of said multiplied values as the mean value and the standard deviation of the image feature quantity.
 7. An image processing program according to claim 1, comprising: an input function for inputting whether or not the image corrected by said image correcting function is an intended image; an input result storing function for storing a result input through said input function; and a probability display function for displaying the probability that said corrected image is the intended image, based on the input result stored by said input result storing function.
 8. A computer-readable recording medium recorded with an image processing program for realizing on a computer: a statistics extracting function for extracting a mean value and a standard deviation of a feature quantity of an image; an image condition judging function for judging an image condition, based on the mean value and the standard deviation extracted by said statistics extracting function; a correction information creating function for creating image correction information in the image condition judged by said image condition judging function, based on the mean value and the standard deviation extracted by said statistics extracting function; and an image correcting function for correcting the image, based on the image correction information created by said correction information creating function.
 9. A computer-readable recording medium recorded with an image processing program according to claim 8, wherein said image condition judging function the image condition of said image through a two-dimensional normal distribution probability function for calculating the probability that an image belongs to each image condition, in which the mean value and the standard deviation of the image feature quantity are set to variables.
 10. A computer-readable recording medium recorded with an image processing program according to claim 9, wherein when the maximum value of said probability is larger than a predetermined value, said image condition judging function judges that the image condition which becomes said probability is the image condition of said image.
 11. A computer-readable recording medium recorded with an image processing program according to claim 9, wherein when the maximum value of said probability is a predetermined value or less, said image condition judging function judges that said image belongs to a plurality of image conditions.
 12. A computer-readable recording medium recorded with an image processing program according to claim 11, wherein when it is judged by said image condition judging function that said image belongs to the plurality of image conditions, said correction information creating function integrates the image correction information in the respective image conditions, corresponding to said probability, to create the image correction information.
 13. A computer-readable recording medium recorded with an image processing program according to claim 8, wherein said statistics extracting function multiplies the mean value and the standard deviation of the image feature quantity in each area obtained by dividing the image into a plurality of areas, by a weighting value corresponding to a difference between the maximum value and the minimum value of the image feature quantity in each area, and sets the sum of said multiplied values as the mean value and the standard deviation of the image feature quantity.
 14. A computer-readable recording medium recorded with an image processing program according to claim 8, comprising: an input function for inputting whether or not the image corrected by said image correcting function is an intended image; an input result storing function for storing a result input through said input function; and a probability display function for displaying the probability that said corrected image is the intended image, based on the input result stored by said input result storing function.
 15. An image processing method comprising: a statistics extracting step for extracting a mean value and a standard deviation of a feature quantity of an image; an image condition judging step for judging an image condition, based on the mean value and the standard deviation extracted by said statistics extracting step; a correction information creating step for creating image correction information in the image condition judged by said image condition judging step, based on the mean value and the standard deviation extracted by said statistics extracting step; and an image correcting step for correcting the image, based on the image correction information created by said correction information creating step.
 16. An image processing apparatus comprising: statistics extracting means for extracting a mean value and a standard deviation of a feature quantity of an image; image condition judging means for judging an image condition, based on the mean value and the standard deviation extracted by said statistics extracting means; correction information creating means for creating image correction information in the image condition judged by said image condition judging means, based on the mean value and the standard deviation extracted by said statistics extracting means; and image correcting means for correcting the image, based on the image correction information created by said correction information creating means. 